﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace DiIoc.Signal.ObserverPattern
{
    public class Tester : MonoBehaviour
    {
        // Start is called before the first frame update
        IEnumerator Start()
        {
            Subject subject = new Subject();

            new PrintObserver(subject);
            new LogObserver(subject);

            for (int i = 0; i < 10; i++)
            {
                subject.State = $"this is No.{i} message";
                yield return new WaitForSeconds(1);
            }
        }

        
    }
}


